<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>指令反馈详情</title>
<#include "/common/resource.ftl">
    <style type="text/css">
        .panel-header {
            background: #fafafa;
        }

        .informationTemplate {
            border: 1px solid #ddd;
            height: 28px;
        }

        .informationContainer {
            padding-top: 10px;
        }

        .layui-input-block {
            line-height: 36px;
        }

        .layui-form-label {
            font-weight: bold;
        }
    </style>
    <script type="text/javascript">
        $(function () {
        <#if (params.id)??>
            $.ajaxRequest({
                url: '${params.contextPath}/web/instructionFeedBack/getById.json',
                data: {instructionFeedBackId: "${params.id}"},
                success: function (resp) {
                    if (!resp.success) {
                        $.message(resp.message);
                        return;
                    }
                    var record = resp.data;
                    for (var key in record) {
                        $("#" + key).html(record[key]);
                    }
                    if (record.attachmentList) {
                        $(record.attachmentList).each(function (i, item) {
                            var imgId = item.id;
                            var imgSize = item.size;
                            var imgUrl = "${params.contextPath}/web/attachment/download/{0}.json".format(imgId);
                            var content = '<div style="margin:5px 0px;">';
                            content += '<a href="{imageUrl}" target="_blank"><i class="AddFile AddBefImg">{imageName}({imageSize})</i></a>';
                            content += '</div>';
                            content = content.format({
                                imageId: imgId,
                                imageUrl: imgUrl,
                                imageName: item.originalName,
                                imageSize: imgSize
                            });
                            $("#attachementInfo").append(content);
                        });
                    }
                }
            });
        </#if>

        });
    </script>
</head>
<body class="easyui-layout" fit="true" border="false">
<div data-options="region:'east',split:true" title="基本信息" border="false" style="width:400px;">
    <div class="ui-form">
        <form class="layui-form my-form"
              method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">反馈标题</label>
                <div class="layui-input-block" id="title"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">反馈人</label>
                <div class="layui-input-block" id="userName"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">反馈单位</label>
                <div class="layui-input-block" id="orgName"></div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">反馈时间</label>
                <div class="layui-input-block" id="createtimeStr"></div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">附件</label>
                <div class="layui-input-block" id="attachementInfo">

                </div>
            </div>

        </form>
    </div>
</div>
<div data-options="region:'center',title:'反馈内容'" border="false" style="padding: 10px">
    <div  class="informationContainer">
        <p id="content"></p>
    </div>
</div>
</body>
<script>

</script>
</html>
